at the beginning of 起初;開始; 在開始時; 在...伊始; 在的開始; 在、、、、、、初(指時間); 在初; 在…起始; 在…之初
beginning n. 1.初,當初;開始,端緒,發端;出發點。 2.本原,起源。 3.〔常 pl. 〕早期階段。 4.起頭部分。 at the beginning of the month 月初。 the beginning of a book 書的開頭部分。 the beginnings of science 科學的搖藍期。 rise from humble [modest] beginnings 出身微賤。 A misunderstanding was the beginning of their quarrel. 他們的爭吵起因于彼此誤解。 at the (very) beginning 在當初;首先。 from beginning to end 自始至終,始終;從頭到尾。 In every beginning think of the end. 凡事都要想到它的后果。 in the beginning 當初,起初。 make a beginning 開一個頭,動手。 the beginning of the end 事變的前兆,一葉落而知天下秋。
In the begin block , we initialize our integer variable 在begin塊中,將整數變量
We used a begin block in the previous example 程序輸出如下,這正是我們所期望的:
In pl 1 , a begin block or procedure block 1語言中的開始塊或過程塊。
For such situations , awk allows you to define a begin block 這意味著如果希望任何文本從新的一行開始,那么需要明確寫入
We ll start off with the first line , the begin block and a function definition 我們將從第一行( begin塊和函數定義)開始:
Begin blocks , for instance , will be executed first but can be specified many times throughout the program 例如, begin語句塊會被首先執行,但它可以在程序中多次說明。
The remaining lines define our begin block , which gets executed before awk starts processing our checkbook file 其余行定義了begin塊,在awk開始處理支票簿文件之前將執行這個代碼塊。
Because the begin block is evaluated before awk starts processing the input file , it s an excellent place to initialize the fs field separator variable , print a heading , or initialize other global variables that you ll reference later in the program Awk還有" do . while "循環,它在代碼塊結尾處對條件求值,而不象標準while循環那樣在開始處求值。它類似于其它語言中的" repeat . until "循環。